package com.jmp.feign;

import one.stand.fallback.UserFallBack;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.response.CompanyRecruitResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "user-service", fallback = UserFallBack.class, decode404 = true)
public interface UserFegin {

    /**
     * 修改名片
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/updateCard")
    ResultModel<Boolean> updateCard(@RequestBody BusinessCardRequest request);

    /**
     * 添加收藏
     */
    @PostMapping("/personal/addCollection")
    ResultModel addCollection(@RequestBody CollectionRequest collectionRequest);

    /**
     * 取消收藏
     */
    @PostMapping("/personal/delCollection")
    ResultModel delCollection(@RequestBody CollectionRequest collectionRequest);

    /**
     * 查询收藏
     */
    @PostMapping("/personal/getCollection")
    ResultModel getCollection(@RequestBody CollectionRequest request);

    /**
     * 查询公司信息
     */
    @PostMapping("/personal/getCompanyAllInfo")
    ResultModel getCompanyAllInfo(@RequestBody CompanyRequest companyRequest);

    /**
     * 查询公司官网
     */
    @PostMapping("/personal/getWebsiteInfo")
    ResultModel getWebsiteInfo(@RequestBody WebsiteRequest websiteRequest);

    /**
     * 查询公司招聘信息
     */
    @PostMapping("/personal/getCompanyRecruit")
    ResultModel<List<CompanyRecruitResponse>> getCompanyRecruit(@RequestBody CompanyRecruitRequest request);

    /**
     * 购物车添加收藏
     */
    @PostMapping("/orders/shopAddCollection")
    ResultModel shopAddCollection(@RequestBody CollectionRequest collectionRequest);

    /**
     * 添加官网申请信息表单
     */
    @PostMapping("/official/saveOfficialApply")
    ResultModel saveOfficialApply(@RequestBody OfficialApplyRequest request);

    /**
     * 添加官网联系我们信息表单
     */
    @PostMapping("/official/saveOfficialContact")
    ResultModel saveOfficialContact(@RequestBody OfficialContactRequest request);

    /**
     * 添加官网表单信息
     */
    @PostMapping("/official/saveOfficialFrom")
    ResultModel saveOfficialFrom(@RequestBody OfficialFromRequest request);

    /**
     * 添加商品转发记录
     *
     * @return
     */
    @PostMapping("/record/addGoodsForwardRecord")
    ResultModel<Integer> addGoodsForwardRecord(@RequestBody GoodsForwardRecordRequest request);

    /**
     * 添加商品转发记录
     *
     * @return
     */
    @PostMapping("/record/validGoodsForwardRecord")
    ResultModel<Boolean> validGoodsForwardRecord(@RequestBody GoodsForwardRecordRequest request);

    /**
     * 添加文章转发记录
     *
     * @return
     */
    @PostMapping("/record/addDynamicForwardRecord")
    ResultModel<Boolean> addDynamicForwardRecord(@RequestBody DynamicForwardRecordRequest request);

    /**
     * 佣金/提现列表
     *
     * @return
     */
    @PostMapping("/personal/selectRoyaltyRecord")
    ResultModel<Map<String, Object>> selectRoyaltyRecord(@RequestBody RoyaltyRecordRequest request);

    /**
     * 提现操作
     *
     * @return
     */
    @PostMapping("/personal/doCash")
    ResultModel<Boolean> doCash(@RequestBody RoyaltyRecordRequest request);
}
